<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 100px;
            height: 100px;
            background-color: red;
        }

        /* 当浏览器或屏幕宽度小于 1024px 时 */
        @media (max-width:1024px) {
            div {
                width: 200px;
                height: 200px;
                background-color: blue;
            }
        }

        /* 打印预览 */
        @media print {
            div {
                color: blueviolet;
                font-size: 200px;
            }
        }
    </style>
    <!-- 外部引入 -->
    <!-- 当屏幕宽度小于等于 700px 时 -->
    <link rel="stylesheet" media="(max-width:700px)" href="./style.css">
</head>

<body>
    <div>我是 div 标签</div>
</body>

</html>